home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / SML⁄NJ 93+ / Documentation / examples / spread / parse.sig < prev    next >
Encoding:
Text File  |  1995-12-30  |  294 b   |  15 lines  |  [TEXT/R*ch]

  1. signature PARSE =
  2. sig
  3.     structure F : FORMULA
  4.     val parse : string -> F.formula
  5. end
  6.  
  7. (* Grammar (in order of precedence):
  8.  
  9.     exp ->  NUM  |  ( exp )  |  [ exp , exp ] 
  10.     exp ->  exp * exp  |   exp / exp
  11.     exp ->  exp + exp  |  exp - exp
  12.     exp ->  "if" exp "then" exp "else" exp
  13. *)
  14.  
  15.